package biz.obake.team.touchprotector.qstile;

import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.service.quicksettings.TileService;
import biz.obake.team.touchprotector.ui.MainActivity;
import d.b;
import d.h.b.c;

public final class QSTileSettingsService extends TileService {

    /* renamed from: b  reason: collision with root package name */
    public static final a f1781b = new a((a) null);

    public static final class a {
        private a() {
        }

        public /* synthetic */ a(a aVar) {
            this();
        }

        public final void a(boolean z) {
            int i;
            biz.obake.team.android.a a2 = biz.obake.team.android.a.a();
            c.b(a2, "BaseApplication.getInstance()");
            PackageManager packageManager = a2.getPackageManager();
            ComponentName componentName = new ComponentName(a2, QSTileSettingsService.class);
            if (z) {
                i = 1;
            } else if (!z) {
                i = 2;
            } else {
                throw new b();
            }
            packageManager.setComponentEnabledSetting(componentName, i, 1);
        }
    }

    public static final void a(boolean z) {
        f1781b.a(z);
    }

    public void onClick() {
        startActivity(new Intent(this, MainActivity.class).setFlags(268435456));
        biz.obake.team.touchprotector.c.f();
    }
}
